package jvm.classloader;

import java.lang.reflect.Method;

public class Test14 {
    public static void main(String[] args) throws Exception {
        Test11 loader1 = new Test11("loader1");
        Test11 loader2 = new Test11("loader2");

        Class<?> clazz1 = loader1.loadClass("jvm.classloader.MyPerson");
        Class<?> clazz2 = loader2.loadClass("jvm.classloader.MyPerson");

        System.out.println(clazz1 == clazz2);

        Object object1 = clazz1.newInstance();
        Object object2 = clazz2.newInstance();

        Method method = clazz1.getMethod("setPerson", Object.class);
        method.invoke(object1, object2);




    }
}
